import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/material.dart';

import 'action.dart';
import 'state.dart';

Widget buildView(VillageHouseChooseState state, Dispatch dispatch, ViewService viewService) {
  return Scaffold(
    appBar: AppBar(
      title: Text('选择房屋'),
      actions: <Widget>[
        IconButton(icon: Icon(Icons.save),onPressed: (){
          Navigator.pop(viewService.context,{'build':state.pickerState.selectedBuildInfo,'unit':state.pickerState.selectedUnitInfo,'house':state.pickerState.selectedHouseInfo});//返回选中的房屋信息
        },)
      ],
    ),
    body: viewService.buildComponent('housePicker'),
  );
}
